/*
 * Hitted.h
 *
 *  Created on: 06/05/2011
 *      Author: DessaVida
 */

#ifndef HITTED_H_
#define HITTED_H_

#include "Component.h"
#include "util/Timer.h"

#include <vector>
#include <algorithm>
using namespace std;


class Hitted : public Component{
private:
	int recoverySpeed;
	int baseRecoverySpeed;

	bool active;

	int totalLife;
	int currentLife;
public:
	vector<int> *attackObjs;
	Timer *timer;

	Hitted(int id, int recoverySpeed, int life);
	virtual ~Hitted();

	void onHit(int id, int damage);
	/*
	 * Getters and Setters
	 */
    bool getActive() const;
    vector<int> *getAttackObjs() const;
    int getBaseRecoverySpeed() const;
    int getRecoverySpeed() const;
    void setActive(bool active);
    void setAttackObjs(vector<int> *attackObjs);
    void setBaseRecoverySpeed(int baseRecoverySpeed);
    void setRecoverySpeed(int recoverySpeed);
    int getCurrentLife() const;
    int getTotalLife() const;
    void setCurrentLife(int currentLife);
    void setTotalLife(int totalLife);
};

#endif /* HITTED_H_ */
